<?php 
?>

<p>Unit: <?php echo $unit->getName()?></p>

<?php $value = $unit->getPropertyValue('can_have_members');?>
<p>Property Value Type: <?php echo gettype($value)?></p>
<p>Property Value 'can_have_members': <?php echo $value->getValue()?></p>

<p>Elective Offices:</p>
<?php $properties = $unit->getPropertyValuesByType(OrganizationalPropertyType::ELECTIVE_OFFICE);?>
<?php foreach($properties as $k => $v):?>
<p><?php echo $k?> - <?php echo $v?> - <?php echo $v->getValue();?> - <?php echo $v->getDisplayValue();?> - <?php echo $v->getFormWidget()->render('test');?></p>
<?php endforeach;?>

<?php $property_values = $unit->getPropertyValues();?>